﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace zielonka.co.uk.extensions.system
{
    /*
        var options = SomeOptions.OptionA;
        options = options.SetOn(OptionB);
        options = options.SetOn(OptionC);

        if (options.AnyOf(SomeOptions.OptionA | SomeOptions.OptionB))
        {
        etc.
     */

    public static partial class EnumExtensions
    {
       public static object SetOn(this object mask, object flags)
        {
            return (Convert.ToInt64(mask) | Convert.ToInt64(flags)) != 0;
        }
    }
}
